package callgraph.process;

import callgraph.dto.CallIdCounter;
import callgraph.dto.ClassInterfaceMethodInfo;
import callgraph.dto.ExtendsClassMethodInfo;
import callgraph.dto.MethodCallDto;
import lombok.Getter;
import lombok.Setter;

import java.util.*;

@Getter
@Setter
public class CallGraphProcessStorage {

    public static final int INIT_SIZE_100 = 100;
    public static final int INIT_SIZE_500 = 500;
    public static final int INIT_SIZE_1000 = 1000;

    private Map<String, Set<String>> calleeMethodMapGlobal;
    private Map<String, ClassInterfaceMethodInfo> classInterfaceMethodInfoMap = new HashMap<>(INIT_SIZE_100);
    private Map<String, List<String>> interfaceMethodWithArgsMap = new HashMap<>(INIT_SIZE_100);
    private Map<String, Boolean> runnableImplClassMap = new HashMap<>(INIT_SIZE_100);
    private Map<String, Boolean> callableImplClassMap = new HashMap<>(INIT_SIZE_100);
    private Map<String, Boolean> threadChildClassMap = new HashMap<>(INIT_SIZE_100);
    private Map<String, Set<String>> methodAnnotationMap = new HashMap<>(INIT_SIZE_100);
    private Set<String> extendsClassesSet = new HashSet<>(INIT_SIZE_500);
    private Map<String, ExtendsClassMethodInfo> extendsClassMethodInfoMap = new HashMap<>(INIT_SIZE_500);
    private Map<String, List<String>> childrenClassInfoMap = new HashMap<>(INIT_SIZE_500);
    private CallIdCounter callIdCounter = CallIdCounter.newInstance();

    private Map<String, List<MethodCallDto>> classCallerMethodMap = new HashMap<>(INIT_SIZE_1000);

    public CallGraphProcessStorage(Map<String, Set<String>> calleeMethodMapGlobal) {
        this.calleeMethodMapGlobal = calleeMethodMapGlobal;
    }
}
